import request from '@/utils/request'

// 查询项目统计信息
export function countProject(query) {
	return request({
		url: '/function/project/showCensus',
		method: 'get',
		params: query
	})
}

// 查询项目列表
export function listProject(query) {
	return request({
		url: '/function/project/list',
		method: 'get',
		params: query
	})
}
// 查询日志列表
export function listLog(query) {
	return request({
		url: '/function/log/list',
		method: 'get',
		params: query
	})
}
// 查询合同列表
export function listContractManagement(query) {
	return request({
		url: '/function/treaty/list',
		method: 'get',
		params: query
	})
}
// 查询项目结案信息
export function selectProjectEnd(query) {
	return request({
		url: '/system/file/detail',
		method: 'get',
		params: query
	})
}
// 项目结案
export function updateProjectEnd(data) {
	return request({
		url: '/system/file',
		method: 'post',
		data: data
	})
}
// 删除成员
export function delStaff(id) {
	return request({
		url: '/function/staff/' + id,
		method: 'delete'
	})
}
// 查询审核列表
export function listCheckManagement(query) {
	return request({
		url: '/function/project/manageList',
		method: 'get',
		params: query
	})
}
// 查询项目列表不分页
export function selectProject(query) {
	return request({
		url: '/function/project/listNoPage',
		method: 'get',
		params: query
	})
}
// 查询合同列表不分页
export function selectTreaty(query) {
	return request({
		url: '/function/treaty/listNoPage',
		method: 'get',
		params: query
	})
}
// 查询日志列表不分页
export function selectLog(query) {
	return request({
		url: '/function/log/listNoPage',
		method: 'get',
		params: query
	})
}
// 项目详情日志模块
export function queryLog(data) {
	return request({
		url: '/function/project/logInfo',
		method: 'get',
		params: data
	})
}
// 新增联系人
export function addPerson(data) {
	return request({
		url: '/function/liaison',
		method: 'post',
		data: data
	})
}
// 删除联系人
export function deletePerson(id) {
	return request({
		url: '/function/liaison/' + id,
		method: 'delete'
	})
}

// 新增项目日志
export function addLog(data) {
	return request({
		url: '/function/log',
		method: 'post',
		data: data
	})
}
// 新增合同
export function addTreaty(data) {
	return request({
		url: '/function/treaty',
		method: 'post',
		data: data
	})
}
// 推送日志
export function mailSend(data) {
	return request({
		url: '/function/log/mailSend',
		method: 'post',
		data: data
	})
}

// 项目获取
export function getProject(id) {
	return request({
		url: '/function/project/' + id,
		method: 'get'
	})
}

// 查询项目详情
export function getDetail(id) {
	return request({
		url: '/function/project/detail/' + id,
		method: 'get'
	})
}

// 新增项目
export function addProject(data) {
	return request({
		url: '/function/project',
		method: 'post',
		data: data
	})
}

// 项目结案
export function endProject(data) {
	return request({
		url: '/system/file/detail',
		method: 'post',
		data: data
	})
}
// 修改项目
export function updateProject(data) {
	return request({
		url: '/function/project',
		method: 'put',
		data: data
	})
}
// 修改合同
export function updateTreaty(data) {
	return request({
		url: '/function/treaty',
		method: 'put',
		data: data
	})
}
// 修改日志
export function updateLog(data) {
	return request({
		url: '/function/log',
		method: 'put',
		data: data
	})
}
// 查找成员
export function findStaff(query) {
	return request({
		url: '/function/staff/list',
		method: 'get',
		params: query
	})
}
// 插入成员
export function insertStaff(data) {
	return request({
		url: '/function/staff',
		method: 'post',
		data: data
	})
}
// 删除项目
export function delProject(id) {
	return request({
		url: '/function/project/' + id,
		method: 'delete'
	})
}
// 删除合同
export function delTreaty(id) {
	return request({
		url: '/function/treaty/' + id,
		method: 'delete'
	})
}
// 查询职工
export function selectStaff(query) {
	return request({
		url: '/function/staff/staffInfo',
		method: 'get',
		params: query
	})
}
// 查询职工
export function sendPiao(query) {
	return request({
		url: '/function/treaty/Invoice',
		method: 'get',
		params: query
	})
}

// 合同详情
export function treatyDetail(id) {
	return request({
		url: '/function/treaty/' + id,
		method: 'get'
	})
}
// 日志详情
export function logDetail(id) {
	return request({
		url: '/function/log/' + id,
		method: 'get'
	})
}

// 新增开票记录
export function addTreatyInvoicing(data) {
	return request({
		url: '/function/treatyInvoicing',
		method: 'post',
		data: data
	})
}

// 查询开票记录
export function selectTreatyInvoicing(query) {
	return request({
		url: '/function/treatyInvoicing/list',
		method: 'get',
		params: query
	})
}

// 修改开票记录
export function updateTreatyInvoicing(data) {
	return request({
		url: '/function/treatyInvoicing',
		method: 'put',
		data: data
	})
}

// 删除开票记录
export function delTreatyInvoicing(id) {
	return request({
		url: '/function/treatyInvoicing/' + id,
		method: 'delete'
	})
}
// 查询收款记录
export function selectTreatyCollection(query) {
	return request({
		url: '/function/treatyCollection/list',
		method: 'get',
		params: query
	})
}

// 新增收款记录
export function addTreatyCollection(data) {
	return request({
		url: '/function/treatyCollection',
		method: 'post',
		data: data
	})
}

// 修改收款记录
export function updateTreatyCollection(data) {
	return request({
		url: '/function/treatyCollection',
		method: 'put',
		data: data
	})
}

// 删除收款记录
export function delTreatyCollection(id) {
	return request({
		url: '/function/treatyCollection/' + id,
		method: 'delete'
	})
}
// 查询金额
export function selectMoneyCensus(query) {
	return request({
		url: '/function/treaty/MoneyCensus/',
		method: 'get',
		params: query
	})
}
// 资料列表
export function selectRes(query) {
	return request({
		url: '/project/resource/list',
		method: 'get',
		params: query
	})
}
// 资料新增
export function addRes(data) {
	return request({
		url: '/project/resource',
		method: 'post',
		data: data
	})
}
// 资料修改
export function updateRes(data) {
	return request({
		url: '/project/resource',
		method: 'put',
		data: data
	})
}
// 资料删除
export function deleteResource(id) {
	return request({
		url: '/project/resource/' + id,
		method: 'delete'
	})
}
// 资料查询
export function getResource(id) {
	return request({
		url: '/project/resource/' + id,
		method: 'get'
	})
}
// 审核日志查询
export function getLogRecords(query) {
	return request({
		url: '/audit/record/listPage',
		method: 'get',
		params: query
	})
}
// 获取
export function getExecution(id) {
	return request({
		url: '/function/project/executionData/' + id,
		method: 'get'
	})
}

// 获取
export function getItem(data) {
	return request({
		url: '/function/procureItem/quotationQueryProcure',
		method: 'post',
		data: data
	})
}

// 服务质量评分列表查询
export function qualitys(query) {
	return request({
		url: '/function/evaluate/list',
		method: 'get',
		params: query
	})
}

// 服务质量评分
export function qualityAdd(data) {
	return request({
		url: '/function/evaluate',
		method: 'post',
		data: data
	})
}

// 服务质量评分
export function qualityEdit(data) {
	return request({
		url: '/function/evaluate',
		method: 'put',
		data: data
	})
}

// 服务质量评分
export function qualityDelete(id) {
	return request({
		url: '/function/evaluate/' + id,
		method: 'delete'
	})
}

// 查询汇总列表
export function listProjectSummary(query) {
	return request({
		url: '/function/project/summary',
		method: 'get',
		params: query
	})
}
